Socket
Socket
Sign inDemoInstall

@octokit/oauth-methods

Package Overview
Dependencies
Maintainers
2
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@octokit/oauth-methods

Set of stateless request methods to create, check, reset, refresh, and delete user access tokens for OAuth and GitHub Apps


Version published
Weekly downloads
1M
decreased by-19.24%
Maintainers
2
Weekly downloads
 
Created

What is @octokit/oauth-methods?

The @octokit/oauth-methods package provides a set of methods to implement GitHub OAuth authentication in Node.js applications. It simplifies the process of implementing OAuth flows, handling tokens, and managing OAuth applications.

What are @octokit/oauth-methods's main functionalities?

Creating an OAuth device code

This feature allows you to create a new OAuth device code. It's useful for devices that don't have a browser or have limited input capabilities.

{"async createOAuthDeviceCode({ clientType, clientId, scopes }) { const result = await oauthMethods.createOAuthDeviceCode({ clientType, clientId, scopes }); return result; }}

Exchanging a device code for an OAuth token

After obtaining a device code, this method can be used to exchange it for an OAuth token, completing the authentication process.

{"async exchangeDeviceCode({ clientType, clientId, deviceCode }) { const result = await oauthMethods.exchangeDeviceCode({ clientType, clientId, deviceCode }); return result; }}

Refreshing an OAuth token

This feature is used to refresh an expired OAuth token, allowing for continued access without requiring the user to re-authenticate.

{"async refreshToken({ clientType, clientId, refreshToken }) { const result = await oauthMethods.refreshToken({ clientType, clientId, refreshToken }); return result; }}

Checking a token's authentication

This method checks the validity of an OAuth token, which is useful for verifying that a token has not been revoked or expired.

{"async checkToken({ auth }) { const result = await oauthMethods.checkToken({ auth }); return result; }}

Resetting a token

This feature allows you to reset an OAuth token, which can be useful in situations where token security may be compromised.

{"async resetToken({ auth }) { const result = await oauthMethods.resetToken({ auth }); return result; }}

Other packages similar to @octokit/oauth-methods

Keywords

FAQs

Package last updated on 11 Oct 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc